#include<iostream>
#include<math.h>
using namespace std;
class Circle;
//class Point;
class Point {
public:
	Point(double a,double b):x(a),y(b){}
	friend int isPointInCircle(Point &a, Circle &b);
private:
	double x;
	double y;
};
class Circle {
public:
	Circle(Point a,double r):o(a),r(r){}
	friend int isPointInCircle(Point &a, Circle &b);

private:
	double r;
	Point o;
};

int isPointInCircle(Point &a, Circle &b)
{
	double	dis = (a.x - b.o.x) * (a.x - b.o.x) + (a.y - b.o.y) * (a.y - b.o.y);
	double r2 = b.r * b.r;
	cout <<"dis pow 2 is "<< dis<<endl;
	cout << "r is " << b.r << endl;
	if (r2 == dis)
	{
		cout << "on the circle" << endl;
		return 0;
	}
	if (r2 < dis)
	{
		cout << "out of circle" << endl;
		return 1;
	}
	if (r2 > dis)
	{
		cout << "in the circle" << endl;
		return -1;
	}
}

void main(void)
{
	Point a(1, 1);
	Point o(2, 2);
	Circle p(o, 1);
	isPointInCircle(a, p);
}